package com.swu.pad.experiment.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.swu.pad.assignment.entity.Assignment;
import com.swu.pad.experiment.service.ExperimentService;

@Controller
@RequestMapping(value = "experiment")
public class ExperimentController {
         @Autowired
         private ExperimentService experimentService;
         
         /*
          * 获得班级组内评论
          */
         @ResponseBody
     	 @RequestMapping(value = "/getCourseGroupCommentInfo")
         public  List<Map<String,Object>> getCourseGroupCommentInfo(String activityId,String courseId){
          return experimentService.getCourseGroupCommentInfo(activityId,courseId);
         }
         
         
         /*
          * 反思作业参考分 csv名称。课程作业名称
          */
         @ResponseBody
     	 @RequestMapping(value = "/getCsvName")
         public String getCsvName(String assignmentId){
          return experimentService.getCsvName(assignmentId);
         }
         
         @ResponseBody
     	 @RequestMapping(value = "/getCourseReplyInfo")//String activityId,String courseId
         public  List<Map<String,Object>>  getCourseReplyInfo(String activityId,String courseId){
          return experimentService.getCourseReplyInfo(activityId,courseId);
         }
         
     	@ResponseBody
    	@RequestMapping(value = "/getCourseVersion")
    	public Map getCourseVersion(String assignmentId) {
    		
         return experimentService.getAllAssVersion(assignmentId);
    	}
     	
    	@ResponseBody
    	@RequestMapping(value = "/getCommentText")
    	public  List<Map<String,Object>> getCourseVersion(String activityId,String courseId) {
    		
         return experimentService.getCommentText(activityId,courseId);
    	}
    	
    	
    	 /*
         * 获得班级 某次作业下同学们的反思写作参考分数 ，在前端导出为excel表
         */
        @ResponseBody
    	@RequestMapping(value = "/getCourseRftAsmtRferScores")
        public List<Map<String, String>> getCourseRftAsmtRferScores(Assignment assignment) throws Exception{
         return experimentService.getCourseRftAsmtRferScores(assignment);
        }
        /*
         * 获得班级 某次作业反馈内容
         */
        @ResponseBody
    	@RequestMapping(value = "/getStuFbContents")
        public Map<String,Object> getStuFbContents(Assignment assignment){
         return experimentService.getStuFbContents(assignment);
        }
        
        /*
         * 获得班级 某次作业句子修改内容
         */
        @ResponseBody
    	@RequestMapping(value = "/getSentenceModifiedInfo")
        public Map<String,Object> getSentenceModifiedInfo(Assignment assignment){
         return experimentService.getSentenceModifiedInfo(assignment);
        }
        
        /*
                            * 获得班级 某次作业反馈得分图所需信息  暂时不再调用
         */
        @ResponseBody
    	@RequestMapping(value = "/getRftItemScoreInfo")
        public Map<String,Object> getRftItemScoreInfo(Assignment assignment){
         return experimentService.getRftItemScoreInfo(assignment);
        }
        
    	/*
    	 * 
                            * 获得班级 某次作业反馈得分图所需信息
    	 */
		@ResponseBody
		@RequestMapping(value = "/getRftScoreFigInfo")
		public Map<String,Object> getRftScoreFigInfo(Assignment assignment){
		return experimentService.getRftScoreFigInfo(assignment);
		}
        
        
}
